package cn.polarismesh.agent.plugin.nacos.asm;

import cn.polarismesh.agent.core.common.utils.ReflectionUtils;
import cn.polarismesh.agent.plugin.nacos.exception.UnsupportedNacosClientException;
import org.objectweb.asm.*;

import java.lang.reflect.Method;
import java.util.Map;

public class NamingProxyGenerator implements AsmDynamicClassGenerator {

    public byte[] generate() {

        try {
            Class<?> namingProxyClass = Class.forName("com.alibaba.nacos.client.naming.net.NamingProxy");
            Method callServer = ReflectionUtils.findMethod(namingProxyClass, "callServer", String.class, Map.class, Map.class, String.class, String.class);
            if (callServer != null) {
                // body 是 Map 类型 版本为1.3.0之后版本
                return generateAfter130();
            } else {
                int parameterCount = namingProxyClass.getConstructors()[0].getParameterCount();
                if (parameterCount == 4) {
                    // 构造函数参数个数为4 版本为 1.2.0-1.3.0
                    return generateBefore130();
                }
                if (parameterCount == 3) {
                    // 1.1.4版本前
                    return generateBefore114();
                }

            }
        } catch (Exception e) {
            throw new UnsupportedNacosClientException(e);
        }
        throw new UnsupportedNacosClientException();

    }

    private byte[] generateBefore114() {

        ClassWriter classWriter = new ClassWriter(0);
        FieldVisitor fieldVisitor;
        RecordComponentVisitor recordComponentVisitor;
        MethodVisitor methodVisitor;
        AnnotationVisitor annotationVisitor0;

        classWriter.visit(V1_8, ACC_PUBLIC | ACC_SUPER, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", null, "com/alibaba/nacos/client/naming/net/NamingProxy", null);

        classWriter.visitSource("DynamicNamingProxy.java", null);

        {
            fieldVisitor = classWriter.visitField(ACC_PRIVATE, "secondaryServers", "Ljava/util/List;", "Ljava/util/List<Ljava/lang/String;>;", null);
            fieldVisitor.visitEnd();
        }
        {
            fieldVisitor = classWriter.visitField(ACC_PRIVATE, "assist", "Lcn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist;", null, null);
            fieldVisitor.visitEnd();
        }
        {
            fieldVisitor = classWriter.visitField(ACC_PRIVATE | ACC_FINAL, "logger", "Lorg/slf4j/Logger;", null, null);
            fieldVisitor.visitEnd();
        }
        {
            fieldVisitor = classWriter.visitField(ACC_PRIVATE, "maxRetry", "I", null, null);
            fieldVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "<init>", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Properties;)V", null, null);
            methodVisitor.visitCode();
            Label label0 = new Label();
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(25, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "com/alibaba/nacos/client/naming/net/NamingProxy", "<init>", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", false);
            Label label1 = new Label();
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLineNumber(20, label1);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitLdcInsn("com.alibaba.nacos.client.naming");
            methodVisitor.visitMethodInsn(INVOKESTATIC, "org/slf4j/LoggerFactory", "getLogger", "(Ljava/lang/String;)Lorg/slf4j/Logger;", false);
            methodVisitor.visitFieldInsn(PUTFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            Label label2 = new Label();
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(26, label2);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitLdcInsn("namingRequestDomainMaxRetryCount");
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/util/Properties", "getProperty", "(Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitInsn(ICONST_3);
            methodVisitor.visitMethodInsn(INVOKESTATIC, "cn/polarismesh/agent/plugin/nacos/utils/ConvertUtils", "toInt", "(Ljava/lang/String;I)I", false);
            methodVisitor.visitFieldInsn(PUTFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "maxRetry", "I");
            Label label3 = new Label();
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(27, label3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "init", "()V", false);
            Label label4 = new Label();
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLineNumber(28, label4);
            methodVisitor.visitInsn(RETURN);
            Label label5 = new Label();
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy;", null, label0, label5, 0);
            methodVisitor.visitLocalVariable("namespaceId", "Ljava/lang/String;", null, label0, label5, 1);
            methodVisitor.visitLocalVariable("endpoint", "Ljava/lang/String;", null, label0, label5, 2);
            methodVisitor.visitLocalVariable("serverList", "Ljava/lang/String;", null, label0, label5, 3);
            methodVisitor.visitLocalVariable("properties", "Ljava/util/Properties;", null, label0, label5, 4);
            methodVisitor.visitMaxs(4, 5);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PRIVATE, "init", "()V", null, null);
            methodVisitor.visitCode();
            Label label0 = new Label();
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(32, label0);
            methodVisitor.visitLdcInsn("other.nacos.server.addr");
            methodVisitor.visitMethodInsn(INVOKESTATIC, "java/lang/System", "getProperty", "(Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitVarInsn(ASTORE, 1);
            Label label1 = new Label();
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLineNumber(33, label1);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitLdcInsn(",");
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "split", "(Ljava/lang/String;)[Ljava/lang/String;", false);
            methodVisitor.visitMethodInsn(INVOKESTATIC, "java/util/Arrays", "asList", "([Ljava/lang/Object;)Ljava/util/List;", false);
            methodVisitor.visitFieldInsn(PUTFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryServers", "Ljava/util/List;");
            Label label2 = new Label();
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(34, label2);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitTypeInsn(NEW, "cn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist");
            methodVisitor.visitInsn(DUP);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "cn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist", "<init>", "()V", false);
            methodVisitor.visitFieldInsn(PUTFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "assist", "Lcn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist;");
            Label label3 = new Label();
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(35, label3);
            methodVisitor.visitInsn(RETURN);
            Label label4 = new Label();
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy;", null, label0, label4, 0);
            methodVisitor.visitLocalVariable("secondaryServerAddr", "Ljava/lang/String;", null, label1, label4, 1);
            methodVisitor.visitMaxs(3, 2);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "reqAPI", "(Ljava/lang/String;Ljava/util/Map;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", "(Ljava/lang/String;Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;)Ljava/lang/String;", null);
            methodVisitor.visitCode();
            Label label0 = new Label();
            Label label1 = new Label();
            Label label2 = new Label();
            methodVisitor.visitTryCatchBlock(label0, label1, label2, "java/lang/Exception");
            Label label3 = new Label();
            Label label4 = new Label();
            Label label5 = new Label();
            methodVisitor.visitTryCatchBlock(label3, label4, label5, "java/lang/IllegalStateException");
            Label label6 = new Label();
            Label label7 = new Label();
            Label label8 = new Label();
            methodVisitor.visitTryCatchBlock(label6, label7, label8, "java/lang/IllegalStateException");
            Label label9 = new Label();
            methodVisitor.visitLabel(label9);
            methodVisitor.visitLineNumber(40, label9);
            methodVisitor.visitTypeInsn(NEW, "java/lang/StringBuilder");
            methodVisitor.visitInsn(DUP);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "java/lang/StringBuilder", "<init>", "()V", false);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
            methodVisitor.visitLdcInsn("@");
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false);
            methodVisitor.visitVarInsn(ASTORE, 5);
            Label label10 = new Label();
            methodVisitor.visitLabel(label10);
            methodVisitor.visitLineNumber(43, label10);
            methodVisitor.visitFieldInsn(GETSTATIC, "cn/polarismesh/agent/plugin/nacos/constants/NacosConstants", "REGISTER_SERVICE", "Ljava/lang/String;");
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false);
            Label label11 = new Label();
            methodVisitor.visitJumpInsn(IFEQ, label11);
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(45, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "assist", "Lcn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist;");
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "cn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist", "fillMetadata", "(Ljava/util/Map;)V", false);
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLineNumber(48, label1);
            methodVisitor.visitJumpInsn(GOTO, label11);
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(46, label2);
            methodVisitor.visitFrame(Opcodes.F_FULL, 6, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/util/List", "java/lang/String", "java/lang/String"}, 1, new Object[]{"java/lang/Exception"});
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label12 = new Label();
            methodVisitor.visitLabel(label12);
            methodVisitor.visitLineNumber(47, label12);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingProxy register service fillMetadata failed: ");
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            methodVisitor.visitLabel(label11);
            methodVisitor.visitLineNumber(52, label11);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitFieldInsn(GETSTATIC, "cn/polarismesh/agent/plugin/nacos/constants/NacosConstants", "QUERY_LIST", "Ljava/lang/String;");
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false);
            Label label13 = new Label();
            methodVisitor.visitJumpInsn(IFEQ, label13);
            Label label14 = new Label();
            methodVisitor.visitLabel(label14);
            methodVisitor.visitLineNumber(53, label14);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "queryListReqApiProxy", "(Ljava/lang/String;Ljava/util/Map;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label13);
            methodVisitor.visitLineNumber(56, label13);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label15 = new Label();
            methodVisitor.visitLabel(label15);
            methodVisitor.visitLineNumber(57, label15);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 7);
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(59, label3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "com/alibaba/nacos/client/naming/net/NamingProxy", "reqAPI", "(Ljava/lang/String;Ljava/util/Map;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitVarInsn(ASTORE, 6);
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLineNumber(63, label4);
            Label label16 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label16);
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLineNumber(60, label5);
            methodVisitor.visitFrame(Opcodes.F_FULL, 8, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/util/List", "java/lang/String", "java/lang/String", "java/lang/String", "java/lang/IllegalStateException"}, 1, new Object[]{"java/lang/IllegalStateException"});
            methodVisitor.visitVarInsn(ASTORE, 8);
            Label label17 = new Label();
            methodVisitor.visitLabel(label17);
            methodVisitor.visitLineNumber(61, label17);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitVarInsn(ASTORE, 7);
            Label label18 = new Label();
            methodVisitor.visitLabel(label18);
            methodVisitor.visitLineNumber(62, label18);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("primaryServer reqApi failed: {} ");
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", true);
            methodVisitor.visitLabel(label16);
            methodVisitor.visitLineNumber(65, label16);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 8);
            Label label19 = new Label();
            methodVisitor.visitLabel(label19);
            methodVisitor.visitLineNumber(66, label19);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 9);
            methodVisitor.visitLabel(label6);
            methodVisitor.visitLineNumber(68, label6);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryServers", "Ljava/util/List;");
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryReqApi", "(Ljava/lang/String;Ljava/util/Map;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitVarInsn(ASTORE, 8);
            methodVisitor.visitLabel(label7);
            methodVisitor.visitLineNumber(72, label7);
            Label label20 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label20);
            methodVisitor.visitLabel(label8);
            methodVisitor.visitLineNumber(69, label8);
            methodVisitor.visitFrame(Opcodes.F_FULL, 10, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/util/List", "java/lang/String", "java/lang/String", "java/lang/String", "java/lang/IllegalStateException", "java/lang/String", "java/lang/IllegalStateException"}, 1, new Object[]{"java/lang/IllegalStateException"});
            methodVisitor.visitVarInsn(ASTORE, 10);
            Label label21 = new Label();
            methodVisitor.visitLabel(label21);
            methodVisitor.visitLineNumber(70, label21);
            methodVisitor.visitVarInsn(ALOAD, 10);
            methodVisitor.visitVarInsn(ASTORE, 9);
            Label label22 = new Label();
            methodVisitor.visitLabel(label22);
            methodVisitor.visitLineNumber(71, label22);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("secondaryServer reqApi failed: {} ");
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryServers", "Ljava/util/List;");
            methodVisitor.visitVarInsn(ALOAD, 10);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", true);
            methodVisitor.visitLabel(label20);
            methodVisitor.visitLineNumber(75, label20);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 7);
            Label label23 = new Label();
            methodVisitor.visitJumpInsn(IFNULL, label23);
            methodVisitor.visitVarInsn(ALOAD, 9);
            methodVisitor.visitJumpInsn(IFNULL, label23);
            Label label24 = new Label();
            methodVisitor.visitLabel(label24);
            methodVisitor.visitLineNumber(76, label24);
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitInsn(ATHROW);
            methodVisitor.visitLabel(label23);
            methodVisitor.visitLineNumber(80, label23);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 7);
            Label label25 = new Label();
            methodVisitor.visitJumpInsn(IFNONNULL, label25);
            Label label26 = new Label();
            methodVisitor.visitLabel(label26);
            methodVisitor.visitLineNumber(81, label26);
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label25);
            methodVisitor.visitLineNumber(83, label25);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitInsn(ARETURN);
            Label label27 = new Label();
            methodVisitor.visitLabel(label27);
            methodVisitor.visitLocalVariable("e", "Ljava/lang/Exception;", null, label12, label11, 6);
            methodVisitor.visitLocalVariable("e", "Ljava/lang/IllegalStateException;", null, label17, label16, 8);
            methodVisitor.visitLocalVariable("e", "Ljava/lang/IllegalStateException;", null, label21, label20, 10);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy;", null, label9, label27, 0);
            methodVisitor.visitLocalVariable("api", "Ljava/lang/String;", null, label9, label27, 1);
            methodVisitor.visitLocalVariable("params", "Ljava/util/Map;", "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;", label9, label27, 2);
            methodVisitor.visitLocalVariable("servers", "Ljava/util/List;", "Ljava/util/List<Ljava/lang/String;>;", label9, label27, 3);
            methodVisitor.visitLocalVariable("method", "Ljava/lang/String;", null, label9, label27, 4);
            methodVisitor.visitLocalVariable("fullApi", "Ljava/lang/String;", null, label10, label27, 5);
            methodVisitor.visitLocalVariable("primaryRet", "Ljava/lang/String;", null, label15, label27, 6);
            methodVisitor.visitLocalVariable("primaryEx", "Ljava/lang/IllegalStateException;", null, label3, label27, 7);
            methodVisitor.visitLocalVariable("secondaryRet", "Ljava/lang/String;", null, label19, label27, 8);
            methodVisitor.visitLocalVariable("secondaryEx", "Ljava/lang/IllegalStateException;", null, label6, label27, 9);
            methodVisitor.visitMaxs(5, 11);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PRIVATE, "secondaryReqApi", "(Ljava/lang/String;Ljava/util/Map;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", "(Ljava/lang/String;Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;)Ljava/lang/String;", null);
            methodVisitor.visitCode();
            Label label0 = new Label();
            Label label1 = new Label();
            Label label2 = new Label();
            methodVisitor.visitTryCatchBlock(label0, label1, label2, "java/lang/Exception");
            Label label3 = new Label();
            Label label4 = new Label();
            Label label5 = new Label();
            methodVisitor.visitTryCatchBlock(label3, label4, label5, "java/lang/Exception");
            Label label6 = new Label();
            methodVisitor.visitLabel(label6);
            methodVisitor.visitLineNumber(88, label6);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 5);
            Label label7 = new Label();
            methodVisitor.visitLabel(label7);
            methodVisitor.visitLineNumber(89, label7);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "size", "()I", true);
            methodVisitor.visitInsn(ICONST_1);
            Label label8 = new Label();
            methodVisitor.visitJumpInsn(IF_ICMPNE, label8);
            Label label9 = new Label();
            methodVisitor.visitLabel(label9);
            methodVisitor.visitLineNumber(90, label9);
            methodVisitor.visitInsn(ICONST_0);
            methodVisitor.visitVarInsn(ISTORE, 6);
            Label label10 = new Label();
            methodVisitor.visitLabel(label10);
            methodVisitor.visitFrame(Opcodes.F_APPEND, 2, new Object[]{"java/lang/Exception", Opcodes.INTEGER}, 0, null);
            methodVisitor.visitVarInsn(ILOAD, 6);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "maxRetry", "I");
            Label label11 = new Label();
            methodVisitor.visitJumpInsn(IF_ICMPGE, label11);
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(92, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitInsn(ICONST_0);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "get", "(I)Ljava/lang/Object;", true);
            methodVisitor.visitTypeInsn(CHECKCAST, "java/lang/String");
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "callServer", "(Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitLabel(label1);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(93, label2);
            methodVisitor.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[]{"java/lang/Exception"});
            methodVisitor.visitVarInsn(ASTORE, 7);
            Label label12 = new Label();
            methodVisitor.visitLabel(label12);
            methodVisitor.visitLineNumber(94, label12);
            methodVisitor.visitTypeInsn(NEW, "java/lang/IllegalStateException");
            methodVisitor.visitInsn(DUP);
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "java/lang/IllegalStateException", "<init>", "(Ljava/lang/Throwable;)V", false);
            methodVisitor.visitVarInsn(ASTORE, 5);
            Label label13 = new Label();
            methodVisitor.visitLabel(label13);
            methodVisitor.visitLineNumber(95, label13);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "isDebugEnabled", "()Z", true);
            Label label14 = new Label();
            methodVisitor.visitJumpInsn(IFEQ, label14);
            Label label15 = new Label();
            methodVisitor.visitLabel(label15);
            methodVisitor.visitLineNumber(96, label15);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingProxy request {} failed.");
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitInsn(ICONST_0);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "get", "(I)Ljava/lang/Object;", true);
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "debug", "(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", true);
            methodVisitor.visitLabel(label14);
            methodVisitor.visitLineNumber(90, label14);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitIincInsn(6, 1);
            methodVisitor.visitJumpInsn(GOTO, label10);
            methodVisitor.visitLabel(label11);
            methodVisitor.visitFrame(Opcodes.F_CHOP, 1, null, 0, null);
            Label label16 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label16);
            methodVisitor.visitLabel(label8);
            methodVisitor.visitLineNumber(101, label8);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitTypeInsn(NEW, "java/util/Random");
            methodVisitor.visitInsn(DUP);
            methodVisitor.visitMethodInsn(INVOKESTATIC, "java/lang/System", "currentTimeMillis", "()J", false);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "java/util/Random", "<init>", "(J)V", false);
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label17 = new Label();
            methodVisitor.visitLabel(label17);
            methodVisitor.visitLineNumber(102, label17);
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "size", "()I", true);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/util/Random", "nextInt", "(I)I", false);
            methodVisitor.visitVarInsn(ISTORE, 7);
            Label label18 = new Label();
            methodVisitor.visitLabel(label18);
            methodVisitor.visitLineNumber(103, label18);
            methodVisitor.visitInsn(ICONST_0);
            methodVisitor.visitVarInsn(ISTORE, 8);
            Label label19 = new Label();
            methodVisitor.visitLabel(label19);
            methodVisitor.visitFrame(Opcodes.F_APPEND, 3, new Object[]{"java/util/Random", Opcodes.INTEGER, Opcodes.INTEGER}, 0, null);
            methodVisitor.visitVarInsn(ILOAD, 8);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "size", "()I", true);
            methodVisitor.visitJumpInsn(IF_ICMPGE, label16);
            Label label20 = new Label();
            methodVisitor.visitLabel(label20);
            methodVisitor.visitLineNumber(104, label20);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ILOAD, 7);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "get", "(I)Ljava/lang/Object;", true);
            methodVisitor.visitTypeInsn(CHECKCAST, "java/lang/String");
            methodVisitor.visitVarInsn(ASTORE, 9);
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(106, label3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 9);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "callServer", "(Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitLabel(label4);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLineNumber(107, label5);
            methodVisitor.visitFrame(Opcodes.F_FULL, 10, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/util/List", "java/lang/String", "java/lang/Exception", "java/util/Random", Opcodes.INTEGER, Opcodes.INTEGER, "java/lang/String"}, 1, new Object[]{"java/lang/Exception"});
            methodVisitor.visitVarInsn(ASTORE, 10);
            Label label21 = new Label();
            methodVisitor.visitLabel(label21);
            methodVisitor.visitLineNumber(108, label21);
            methodVisitor.visitVarInsn(ALOAD, 10);
            methodVisitor.visitVarInsn(ASTORE, 5);
            Label label22 = new Label();
            methodVisitor.visitLabel(label22);
            methodVisitor.visitLineNumber(109, label22);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "isDebugEnabled", "()Z", true);
            Label label23 = new Label();
            methodVisitor.visitJumpInsn(IFEQ, label23);
            Label label24 = new Label();
            methodVisitor.visitLabel(label24);
            methodVisitor.visitLineNumber(110, label24);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingProxy request {} failed.");
            methodVisitor.visitVarInsn(ALOAD, 9);
            methodVisitor.visitVarInsn(ALOAD, 10);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "debug", "(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", true);
            methodVisitor.visitLabel(label23);
            methodVisitor.visitLineNumber(113, label23);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ILOAD, 7);
            methodVisitor.visitInsn(ICONST_1);
            methodVisitor.visitInsn(IADD);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "size", "()I", true);
            methodVisitor.visitInsn(IREM);
            methodVisitor.visitVarInsn(ISTORE, 7);
            Label label25 = new Label();
            methodVisitor.visitLabel(label25);
            methodVisitor.visitLineNumber(103, label25);
            methodVisitor.visitIincInsn(8, 1);
            methodVisitor.visitJumpInsn(GOTO, label19);
            methodVisitor.visitLabel(label16);
            methodVisitor.visitLineNumber(116, label16);
            methodVisitor.visitFrame(Opcodes.F_FULL, 6, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/util/List", "java/lang/String", "java/lang/Exception"}, 0, new Object[]{});
            methodVisitor.visitVarInsn(ALOAD, 5);
            Label label26 = new Label();
            methodVisitor.visitJumpInsn(IFNONNULL, label26);
            methodVisitor.visitTypeInsn(NEW, "java/lang/IllegalStateException");
            methodVisitor.visitInsn(DUP);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "java/lang/IllegalStateException", "<init>", "()V", false);
            Label label27 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label27);
            methodVisitor.visitLabel(label26);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitTypeInsn(NEW, "java/lang/IllegalStateException");
            methodVisitor.visitInsn(DUP);
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "java/lang/IllegalStateException", "<init>", "(Ljava/lang/Throwable;)V", false);
            methodVisitor.visitLabel(label27);
            methodVisitor.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[]{"java/lang/IllegalStateException"});
            methodVisitor.visitInsn(ATHROW);
            Label label28 = new Label();
            methodVisitor.visitLabel(label28);
            methodVisitor.visitLocalVariable("e", "Ljava/lang/Exception;", null, label12, label14, 7);
            methodVisitor.visitLocalVariable("i", "I", null, label10, label11, 6);
            methodVisitor.visitLocalVariable("e", "Ljava/lang/Exception;", null, label21, label23, 10);
            methodVisitor.visitLocalVariable("server", "Ljava/lang/String;", null, label3, label25, 9);
            methodVisitor.visitLocalVariable("i", "I", null, label19, label16, 8);
            methodVisitor.visitLocalVariable("random", "Ljava/util/Random;", null, label17, label16, 6);
            methodVisitor.visitLocalVariable("index", "I", null, label18, label16, 7);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy;", null, label6, label28, 0);
            methodVisitor.visitLocalVariable("api", "Ljava/lang/String;", null, label6, label28, 1);
            methodVisitor.visitLocalVariable("params", "Ljava/util/Map;", "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;", label6, label28, 2);
            methodVisitor.visitLocalVariable("secondaryServers", "Ljava/util/List;", "Ljava/util/List<Ljava/lang/String;>;", label6, label28, 3);
            methodVisitor.visitLocalVariable("method", "Ljava/lang/String;", null, label6, label28, 4);
            methodVisitor.visitLocalVariable("exception", "Ljava/lang/Exception;", null, label7, label28, 5);
            methodVisitor.visitMaxs(5, 11);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PRIVATE, "queryListReqApiProxy", "(Ljava/lang/String;Ljava/util/Map;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", "(Ljava/lang/String;Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;)Ljava/lang/String;", null);
            methodVisitor.visitCode();
            Label label0 = new Label();
            Label label1 = new Label();
            Label label2 = new Label();
            methodVisitor.visitTryCatchBlock(label0, label1, label2, "java/lang/Exception");
            Label label3 = new Label();
            Label label4 = new Label();
            Label label5 = new Label();
            methodVisitor.visitTryCatchBlock(label3, label4, label5, "java/lang/Exception");
            Label label6 = new Label();
            Label label7 = new Label();
            Label label8 = new Label();
            methodVisitor.visitTryCatchBlock(label6, label7, label8, "java/lang/Exception");
            Label label9 = new Label();
            methodVisitor.visitLabel(label9);
            methodVisitor.visitLineNumber(120, label9);
            methodVisitor.visitLdcInsn("");
            methodVisitor.visitVarInsn(ASTORE, 5);
            Label label10 = new Label();
            methodVisitor.visitLabel(label10);
            methodVisitor.visitLineNumber(121, label10);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 6);
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(123, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "com/alibaba/nacos/client/naming/net/NamingProxy", "reqAPI", "(Ljava/lang/String;Ljava/util/Map;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitVarInsn(ASTORE, 5);
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLineNumber(127, label1);
            Label label11 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label11);
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(124, label2);
            methodVisitor.visitFrame(Opcodes.F_FULL, 7, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/util/List", "java/lang/String", "java/lang/String", "java/lang/Exception"}, 1, new Object[]{"java/lang/Exception"});
            methodVisitor.visitVarInsn(ASTORE, 7);
            Label label12 = new Label();
            methodVisitor.visitLabel(label12);
            methodVisitor.visitLineNumber(125, label12);
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label13 = new Label();
            methodVisitor.visitLabel(label13);
            methodVisitor.visitLineNumber(126, label13);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingProxy queryListReqApiProxy {} failed.");
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", true);
            methodVisitor.visitLabel(label11);
            methodVisitor.visitLineNumber(128, label11);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitLdcInsn("");
            methodVisitor.visitVarInsn(ASTORE, 7);
            Label label14 = new Label();
            methodVisitor.visitLabel(label14);
            methodVisitor.visitLineNumber(129, label14);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 8);
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(131, label3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryServers", "Ljava/util/List;");
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryReqApi", "(Ljava/lang/String;Ljava/util/Map;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitVarInsn(ASTORE, 7);
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLineNumber(135, label4);
            Label label15 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label15);
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLineNumber(132, label5);
            methodVisitor.visitFrame(Opcodes.F_FULL, 9, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/util/List", "java/lang/String", "java/lang/String", "java/lang/Exception", "java/lang/String", "java/lang/Exception"}, 1, new Object[]{"java/lang/Exception"});
            methodVisitor.visitVarInsn(ASTORE, 9);
            Label label16 = new Label();
            methodVisitor.visitLabel(label16);
            methodVisitor.visitLineNumber(133, label16);
            methodVisitor.visitVarInsn(ALOAD, 9);
            methodVisitor.visitVarInsn(ASTORE, 8);
            Label label17 = new Label();
            methodVisitor.visitLabel(label17);
            methodVisitor.visitLineNumber(134, label17);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingProxy secondaryServer queryListReqApiProxy  {} failed.");
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryServers", "Ljava/util/List;");
            methodVisitor.visitVarInsn(ALOAD, 9);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", true);
            methodVisitor.visitLabel(label15);
            methodVisitor.visitLineNumber(137, label15);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitJumpInsn(IFNULL, label6);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitJumpInsn(IFNULL, label6);
            Label label18 = new Label();
            methodVisitor.visitLabel(label18);
            methodVisitor.visitLineNumber(138, label18);
            methodVisitor.visitTypeInsn(NEW, "java/lang/IllegalStateException");
            methodVisitor.visitInsn(DUP);
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "java/lang/IllegalStateException", "<init>", "(Ljava/lang/Throwable;)V", false);
            methodVisitor.visitInsn(ATHROW);
            methodVisitor.visitLabel(label6);
            methodVisitor.visitLineNumber(142, label6);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "assist", "Lcn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist;");
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "cn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist", "mergeResult", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitLabel(label7);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label8);
            methodVisitor.visitLineNumber(143, label8);
            methodVisitor.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[]{"java/lang/Exception"});
            methodVisitor.visitVarInsn(ASTORE, 9);
            Label label19 = new Label();
            methodVisitor.visitLabel(label19);
            methodVisitor.visitLineNumber(144, label19);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingProxy mergeResult failed: ");
            methodVisitor.visitVarInsn(ALOAD, 9);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            Label label20 = new Label();
            methodVisitor.visitLabel(label20);
            methodVisitor.visitLineNumber(146, label20);
            methodVisitor.visitVarInsn(ALOAD, 6);
            Label label21 = new Label();
            methodVisitor.visitJumpInsn(IFNONNULL, label21);
            Label label22 = new Label();
            methodVisitor.visitLabel(label22);
            methodVisitor.visitLineNumber(147, label22);
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label21);
            methodVisitor.visitLineNumber(149, label21);
            methodVisitor.visitFrame(Opcodes.F_APPEND, 1, new Object[]{"java/lang/Exception"}, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitInsn(ARETURN);
            Label label23 = new Label();
            methodVisitor.visitLabel(label23);
            methodVisitor.visitLocalVariable("e", "Ljava/lang/Exception;", null, label12, label11, 7);
            methodVisitor.visitLocalVariable("e", "Ljava/lang/Exception;", null, label16, label15, 9);
            methodVisitor.visitLocalVariable("e", "Ljava/lang/Exception;", null, label19, label23, 9);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy;", null, label9, label23, 0);
            methodVisitor.visitLocalVariable("api", "Ljava/lang/String;", null, label9, label23, 1);
            methodVisitor.visitLocalVariable("params", "Ljava/util/Map;", "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;", label9, label23, 2);
            methodVisitor.visitLocalVariable("servers", "Ljava/util/List;", "Ljava/util/List<Ljava/lang/String;>;", label9, label23, 3);
            methodVisitor.visitLocalVariable("method", "Ljava/lang/String;", null, label9, label23, 4);
            methodVisitor.visitLocalVariable("primaryList", "Ljava/lang/String;", null, label10, label23, 5);
            methodVisitor.visitLocalVariable("primaryEx", "Ljava/lang/Exception;", null, label0, label23, 6);
            methodVisitor.visitLocalVariable("secondaryList", "Ljava/lang/String;", null, label14, label23, 7);
            methodVisitor.visitLocalVariable("secondaryEx", "Ljava/lang/Exception;", null, label3, label23, 8);
            methodVisitor.visitMaxs(5, 10);
            methodVisitor.visitEnd();
        }
        classWriter.visitEnd();

        return classWriter.toByteArray();
    }

    public byte[] generateAfter130() {
        ClassWriter classWriter = new ClassWriter(0);
        FieldVisitor fieldVisitor;
        RecordComponentVisitor recordComponentVisitor;
        MethodVisitor methodVisitor;
        AnnotationVisitor annotationVisitor0;

        classWriter.visit(V1_8, ACC_PUBLIC | ACC_SUPER, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", null, "com/alibaba/nacos/client/naming/net/NamingProxy", null);

        classWriter.visitSource("DynamicNamingProxy.java", null);

        {
            fieldVisitor = classWriter.visitField(ACC_PRIVATE, "secondaryServers", "Ljava/util/List;", "Ljava/util/List<Ljava/lang/String;>;", null);
            fieldVisitor.visitEnd();
        }
        {
            fieldVisitor = classWriter.visitField(ACC_PRIVATE, "assist", "Lcn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist;", null, null);
            fieldVisitor.visitEnd();
        }
        {
            fieldVisitor = classWriter.visitField(ACC_PRIVATE | ACC_FINAL, "logger", "Lorg/slf4j/Logger;", null, null);
            fieldVisitor.visitEnd();
        }
        {
            fieldVisitor = classWriter.visitField(ACC_PRIVATE, "maxRetry", "I", null, null);
            fieldVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "<init>", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Properties;)V", null, null);
            methodVisitor.visitCode();
            Label label0 = new Label();
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(26, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "com/alibaba/nacos/client/naming/net/NamingProxy", "<init>", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Properties;)V", false);
            Label label1 = new Label();
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLineNumber(21, label1);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitLdcInsn("com.alibaba.nacos.client.naming");
            methodVisitor.visitMethodInsn(INVOKESTATIC, "org/slf4j/LoggerFactory", "getLogger", "(Ljava/lang/String;)Lorg/slf4j/Logger;", false);
            methodVisitor.visitFieldInsn(PUTFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            Label label2 = new Label();
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(27, label2);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitLdcInsn("namingRequestDomainMaxRetryCount");
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/util/Properties", "getProperty", "(Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitInsn(ICONST_3);
            methodVisitor.visitMethodInsn(INVOKESTATIC, "cn/polarismesh/agent/plugin/nacos/utils/ConvertUtils", "toInt", "(Ljava/lang/String;I)I", false);
            methodVisitor.visitFieldInsn(PUTFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "maxRetry", "I");
            Label label3 = new Label();
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(28, label3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "init", "()V", false);
            Label label4 = new Label();
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLineNumber(29, label4);
            methodVisitor.visitInsn(RETURN);
            Label label5 = new Label();
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy;", null, label0, label5, 0);
            methodVisitor.visitLocalVariable("namespaceId", "Ljava/lang/String;", null, label0, label5, 1);
            methodVisitor.visitLocalVariable("endpoint", "Ljava/lang/String;", null, label0, label5, 2);
            methodVisitor.visitLocalVariable("serverList", "Ljava/lang/String;", null, label0, label5, 3);
            methodVisitor.visitLocalVariable("properties", "Ljava/util/Properties;", null, label0, label5, 4);
            methodVisitor.visitMaxs(5, 5);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PRIVATE, "init", "()V", null, null);
            methodVisitor.visitCode();
            Label label0 = new Label();
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(33, label0);
            methodVisitor.visitLdcInsn("other.nacos.server.addr");
            methodVisitor.visitMethodInsn(INVOKESTATIC, "java/lang/System", "getProperty", "(Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitVarInsn(ASTORE, 1);
            Label label1 = new Label();
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLineNumber(34, label1);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitLdcInsn(",");
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "split", "(Ljava/lang/String;)[Ljava/lang/String;", false);
            methodVisitor.visitMethodInsn(INVOKESTATIC, "java/util/Arrays", "asList", "([Ljava/lang/Object;)Ljava/util/List;", false);
            methodVisitor.visitFieldInsn(PUTFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryServers", "Ljava/util/List;");
            Label label2 = new Label();
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(35, label2);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitTypeInsn(NEW, "cn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist");
            methodVisitor.visitInsn(DUP);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "cn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist", "<init>", "()V", false);
            methodVisitor.visitFieldInsn(PUTFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "assist", "Lcn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist;");
            Label label3 = new Label();
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(36, label3);
            methodVisitor.visitInsn(RETURN);
            Label label4 = new Label();
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy;", null, label0, label4, 0);
            methodVisitor.visitLocalVariable("secondaryServerAddr", "Ljava/lang/String;", null, label1, label4, 1);
            methodVisitor.visitMaxs(3, 2);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "reqApi", "(Ljava/lang/String;Ljava/util/Map;Ljava/util/Map;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", "(Ljava/lang/String;Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;)Ljava/lang/String;", new String[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitCode();
            Label label0 = new Label();
            Label label1 = new Label();
            Label label2 = new Label();
            methodVisitor.visitTryCatchBlock(label0, label1, label2, "java/lang/Exception");
            Label label3 = new Label();
            Label label4 = new Label();
            Label label5 = new Label();
            methodVisitor.visitTryCatchBlock(label3, label4, label5, "com/alibaba/nacos/api/exception/NacosException");
            Label label6 = new Label();
            Label label7 = new Label();
            Label label8 = new Label();
            methodVisitor.visitTryCatchBlock(label6, label7, label8, "com/alibaba/nacos/api/exception/NacosException");
            Label label9 = new Label();
            methodVisitor.visitLabel(label9);
            methodVisitor.visitLineNumber(41, label9);
            methodVisitor.visitTypeInsn(NEW, "java/lang/StringBuilder");
            methodVisitor.visitInsn(DUP);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "java/lang/StringBuilder", "<init>", "()V", false);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
            methodVisitor.visitLdcInsn("@");
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false);
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label10 = new Label();
            methodVisitor.visitLabel(label10);
            methodVisitor.visitLineNumber(44, label10);
            methodVisitor.visitFieldInsn(GETSTATIC, "cn/polarismesh/agent/plugin/nacos/constants/NacosConstants", "REGISTER_SERVICE", "Ljava/lang/String;");
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false);
            Label label11 = new Label();
            methodVisitor.visitJumpInsn(IFEQ, label11);
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(46, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "assist", "Lcn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist;");
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "cn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist", "fillMetadata", "(Ljava/util/Map;)V", false);
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLineNumber(49, label1);
            methodVisitor.visitJumpInsn(GOTO, label11);
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(47, label2);
            methodVisitor.visitFrame(Opcodes.F_FULL, 7, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/util/Map", "java/util/List", "java/lang/String", "java/lang/String"}, 1, new Object[]{"java/lang/Exception"});
            methodVisitor.visitVarInsn(ASTORE, 7);
            Label label12 = new Label();
            methodVisitor.visitLabel(label12);
            methodVisitor.visitLineNumber(48, label12);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingProxy register service fillMetadata failed: ");
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            methodVisitor.visitLabel(label11);
            methodVisitor.visitLineNumber(53, label11);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitFieldInsn(GETSTATIC, "cn/polarismesh/agent/plugin/nacos/constants/NacosConstants", "QUERY_LIST", "Ljava/lang/String;");
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false);
            Label label13 = new Label();
            methodVisitor.visitJumpInsn(IFEQ, label13);
            Label label14 = new Label();
            methodVisitor.visitLabel(label14);
            methodVisitor.visitLineNumber(54, label14);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "queryListReqApiProxy", "(Ljava/lang/String;Ljava/util/Map;Ljava/util/Map;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label13);
            methodVisitor.visitLineNumber(57, label13);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 7);
            Label label15 = new Label();
            methodVisitor.visitLabel(label15);
            methodVisitor.visitLineNumber(58, label15);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 8);
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(60, label3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "com/alibaba/nacos/client/naming/net/NamingProxy", "reqApi", "(Ljava/lang/String;Ljava/util/Map;Ljava/util/Map;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitVarInsn(ASTORE, 7);
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLineNumber(64, label4);
            Label label16 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label16);
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLineNumber(61, label5);
            methodVisitor.visitFrame(Opcodes.F_FULL, 9, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/util/Map", "java/util/List", "java/lang/String", "java/lang/String", "java/lang/String", "com/alibaba/nacos/api/exception/NacosException"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 9);
            Label label17 = new Label();
            methodVisitor.visitLabel(label17);
            methodVisitor.visitLineNumber(62, label17);
            methodVisitor.visitVarInsn(ALOAD, 9);
            methodVisitor.visitVarInsn(ASTORE, 8);
            Label label18 = new Label();
            methodVisitor.visitLabel(label18);
            methodVisitor.visitLineNumber(63, label18);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("primaryServer reqApi failed: {} ");
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitVarInsn(ALOAD, 9);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", true);
            methodVisitor.visitLabel(label16);
            methodVisitor.visitLineNumber(66, label16);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 9);
            Label label19 = new Label();
            methodVisitor.visitLabel(label19);
            methodVisitor.visitLineNumber(67, label19);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 10);
            methodVisitor.visitLabel(label6);
            methodVisitor.visitLineNumber(69, label6);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryServers", "Ljava/util/List;");
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryReqApi", "(Ljava/lang/String;Ljava/util/Map;Ljava/util/Map;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitVarInsn(ASTORE, 9);
            methodVisitor.visitLabel(label7);
            methodVisitor.visitLineNumber(73, label7);
            Label label20 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label20);
            methodVisitor.visitLabel(label8);
            methodVisitor.visitLineNumber(70, label8);
            methodVisitor.visitFrame(Opcodes.F_FULL, 11, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/util/Map", "java/util/List", "java/lang/String", "java/lang/String", "java/lang/String", "com/alibaba/nacos/api/exception/NacosException", "java/lang/String", "com/alibaba/nacos/api/exception/NacosException"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 11);
            Label label21 = new Label();
            methodVisitor.visitLabel(label21);
            methodVisitor.visitLineNumber(71, label21);
            methodVisitor.visitVarInsn(ALOAD, 11);
            methodVisitor.visitVarInsn(ASTORE, 10);
            Label label22 = new Label();
            methodVisitor.visitLabel(label22);
            methodVisitor.visitLineNumber(72, label22);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("secondaryServer reqApi failed: {} ");
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryServers", "Ljava/util/List;");
            methodVisitor.visitVarInsn(ALOAD, 11);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", true);
            methodVisitor.visitLabel(label20);
            methodVisitor.visitLineNumber(76, label20);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 8);
            Label label23 = new Label();
            methodVisitor.visitJumpInsn(IFNULL, label23);
            methodVisitor.visitVarInsn(ALOAD, 10);
            methodVisitor.visitJumpInsn(IFNULL, label23);
            Label label24 = new Label();
            methodVisitor.visitLabel(label24);
            methodVisitor.visitLineNumber(77, label24);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitInsn(ATHROW);
            methodVisitor.visitLabel(label23);
            methodVisitor.visitLineNumber(81, label23);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 8);
            Label label25 = new Label();
            methodVisitor.visitJumpInsn(IFNONNULL, label25);
            Label label26 = new Label();
            methodVisitor.visitLabel(label26);
            methodVisitor.visitLineNumber(82, label26);
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label25);
            methodVisitor.visitLineNumber(84, label25);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 9);
            methodVisitor.visitInsn(ARETURN);
            Label label27 = new Label();
            methodVisitor.visitLabel(label27);
            methodVisitor.visitLocalVariable("e", "Ljava/lang/Exception;", null, label12, label11, 7);
            methodVisitor.visitLocalVariable("e", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label17, label16, 9);
            methodVisitor.visitLocalVariable("e", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label21, label20, 11);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy;", null, label9, label27, 0);
            methodVisitor.visitLocalVariable("api", "Ljava/lang/String;", null, label9, label27, 1);
            methodVisitor.visitLocalVariable("params", "Ljava/util/Map;", "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;", label9, label27, 2);
            methodVisitor.visitLocalVariable("body", "Ljava/util/Map;", "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;", label9, label27, 3);
            methodVisitor.visitLocalVariable("servers", "Ljava/util/List;", "Ljava/util/List<Ljava/lang/String;>;", label9, label27, 4);
            methodVisitor.visitLocalVariable("method", "Ljava/lang/String;", null, label9, label27, 5);
            methodVisitor.visitLocalVariable("fullApi", "Ljava/lang/String;", null, label10, label27, 6);
            methodVisitor.visitLocalVariable("primaryRet", "Ljava/lang/String;", null, label15, label27, 7);
            methodVisitor.visitLocalVariable("primaryEx", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label3, label27, 8);
            methodVisitor.visitLocalVariable("secondaryRet", "Ljava/lang/String;", null, label19, label27, 9);
            methodVisitor.visitLocalVariable("secondaryEx", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label6, label27, 10);
            methodVisitor.visitMaxs(6, 12);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PRIVATE, "secondaryReqApi", "(Ljava/lang/String;Ljava/util/Map;Ljava/util/Map;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", "(Ljava/lang/String;Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;)Ljava/lang/String;", new String[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitCode();
            Label label0 = new Label();
            Label label1 = new Label();
            Label label2 = new Label();
            methodVisitor.visitTryCatchBlock(label0, label1, label2, "com/alibaba/nacos/api/exception/NacosException");
            Label label3 = new Label();
            Label label4 = new Label();
            Label label5 = new Label();
            methodVisitor.visitTryCatchBlock(label3, label4, label5, "com/alibaba/nacos/api/exception/NacosException");
            Label label6 = new Label();
            methodVisitor.visitLabel(label6);
            methodVisitor.visitLineNumber(89, label6);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label7 = new Label();
            methodVisitor.visitLabel(label7);
            methodVisitor.visitLineNumber(90, label7);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "size", "()I", true);
            methodVisitor.visitInsn(ICONST_1);
            Label label8 = new Label();
            methodVisitor.visitJumpInsn(IF_ICMPNE, label8);
            Label label9 = new Label();
            methodVisitor.visitLabel(label9);
            methodVisitor.visitLineNumber(91, label9);
            methodVisitor.visitInsn(ICONST_0);
            methodVisitor.visitVarInsn(ISTORE, 7);
            Label label10 = new Label();
            methodVisitor.visitLabel(label10);
            methodVisitor.visitFrame(Opcodes.F_APPEND, 2, new Object[]{"com/alibaba/nacos/api/exception/NacosException", Opcodes.INTEGER}, 0, null);
            methodVisitor.visitVarInsn(ILOAD, 7);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "maxRetry", "I");
            Label label11 = new Label();
            methodVisitor.visitJumpInsn(IF_ICMPGE, label11);
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(93, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitInsn(ICONST_0);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "get", "(I)Ljava/lang/Object;", true);
            methodVisitor.visitTypeInsn(CHECKCAST, "java/lang/String");
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "callServer", "(Ljava/lang/String;Ljava/util/Map;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitLabel(label1);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(94, label2);
            methodVisitor.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 8);
            Label label12 = new Label();
            methodVisitor.visitLabel(label12);
            methodVisitor.visitLineNumber(95, label12);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label13 = new Label();
            methodVisitor.visitLabel(label13);
            methodVisitor.visitLineNumber(96, label13);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "isDebugEnabled", "()Z", true);
            Label label14 = new Label();
            methodVisitor.visitJumpInsn(IFEQ, label14);
            Label label15 = new Label();
            methodVisitor.visitLabel(label15);
            methodVisitor.visitLineNumber(97, label15);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingProxy request {} failed.");
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitInsn(ICONST_0);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "get", "(I)Ljava/lang/Object;", true);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "debug", "(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", true);
            methodVisitor.visitLabel(label14);
            methodVisitor.visitLineNumber(91, label14);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitIincInsn(7, 1);
            methodVisitor.visitJumpInsn(GOTO, label10);
            methodVisitor.visitLabel(label11);
            methodVisitor.visitFrame(Opcodes.F_CHOP, 1, null, 0, null);
            Label label16 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label16);
            methodVisitor.visitLabel(label8);
            methodVisitor.visitLineNumber(102, label8);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitTypeInsn(NEW, "java/util/Random");
            methodVisitor.visitInsn(DUP);
            methodVisitor.visitMethodInsn(INVOKESTATIC, "java/lang/System", "currentTimeMillis", "()J", false);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "java/util/Random", "<init>", "(J)V", false);
            methodVisitor.visitVarInsn(ASTORE, 7);
            Label label17 = new Label();
            methodVisitor.visitLabel(label17);
            methodVisitor.visitLineNumber(103, label17);
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "size", "()I", true);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/util/Random", "nextInt", "(I)I", false);
            methodVisitor.visitVarInsn(ISTORE, 8);
            Label label18 = new Label();
            methodVisitor.visitLabel(label18);
            methodVisitor.visitLineNumber(104, label18);
            methodVisitor.visitInsn(ICONST_0);
            methodVisitor.visitVarInsn(ISTORE, 9);
            Label label19 = new Label();
            methodVisitor.visitLabel(label19);
            methodVisitor.visitFrame(Opcodes.F_APPEND, 3, new Object[]{"java/util/Random", Opcodes.INTEGER, Opcodes.INTEGER}, 0, null);
            methodVisitor.visitVarInsn(ILOAD, 9);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "size", "()I", true);
            methodVisitor.visitJumpInsn(IF_ICMPGE, label16);
            Label label20 = new Label();
            methodVisitor.visitLabel(label20);
            methodVisitor.visitLineNumber(105, label20);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitVarInsn(ILOAD, 8);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "get", "(I)Ljava/lang/Object;", true);
            methodVisitor.visitTypeInsn(CHECKCAST, "java/lang/String");
            methodVisitor.visitVarInsn(ASTORE, 10);
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(107, label3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 10);
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "callServer", "(Ljava/lang/String;Ljava/util/Map;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitLabel(label4);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLineNumber(108, label5);
            methodVisitor.visitFrame(Opcodes.F_FULL, 11, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/util/Map", "java/util/List", "java/lang/String", "com/alibaba/nacos/api/exception/NacosException", "java/util/Random", Opcodes.INTEGER, Opcodes.INTEGER, "java/lang/String"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 11);
            Label label21 = new Label();
            methodVisitor.visitLabel(label21);
            methodVisitor.visitLineNumber(109, label21);
            methodVisitor.visitVarInsn(ALOAD, 11);
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label22 = new Label();
            methodVisitor.visitLabel(label22);
            methodVisitor.visitLineNumber(110, label22);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "isDebugEnabled", "()Z", true);
            Label label23 = new Label();
            methodVisitor.visitJumpInsn(IFEQ, label23);
            Label label24 = new Label();
            methodVisitor.visitLabel(label24);
            methodVisitor.visitLineNumber(111, label24);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingProxy request {} failed.");
            methodVisitor.visitVarInsn(ALOAD, 10);
            methodVisitor.visitVarInsn(ALOAD, 11);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "debug", "(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", true);
            methodVisitor.visitLabel(label23);
            methodVisitor.visitLineNumber(114, label23);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ILOAD, 8);
            methodVisitor.visitInsn(ICONST_1);
            methodVisitor.visitInsn(IADD);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "size", "()I", true);
            methodVisitor.visitInsn(IREM);
            methodVisitor.visitVarInsn(ISTORE, 8);
            Label label25 = new Label();
            methodVisitor.visitLabel(label25);
            methodVisitor.visitLineNumber(104, label25);
            methodVisitor.visitIincInsn(9, 1);
            methodVisitor.visitJumpInsn(GOTO, label19);
            methodVisitor.visitLabel(label16);
            methodVisitor.visitLineNumber(117, label16);
            methodVisitor.visitFrame(Opcodes.F_FULL, 7, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/util/Map", "java/util/List", "java/lang/String", "com/alibaba/nacos/api/exception/NacosException"}, 0, new Object[]{});
            methodVisitor.visitVarInsn(ALOAD, 6);
            Label label26 = new Label();
            methodVisitor.visitJumpInsn(IFNONNULL, label26);
            methodVisitor.visitTypeInsn(NEW, "com/alibaba/nacos/api/exception/NacosException");
            methodVisitor.visitInsn(DUP);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "com/alibaba/nacos/api/exception/NacosException", "<init>", "()V", false);
            Label label27 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label27);
            methodVisitor.visitLabel(label26);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitLabel(label27);
            methodVisitor.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitInsn(ATHROW);
            Label label28 = new Label();
            methodVisitor.visitLabel(label28);
            methodVisitor.visitLocalVariable("e", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label12, label14, 8);
            methodVisitor.visitLocalVariable("i", "I", null, label10, label11, 7);
            methodVisitor.visitLocalVariable("e", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label21, label23, 11);
            methodVisitor.visitLocalVariable("server", "Ljava/lang/String;", null, label3, label25, 10);
            methodVisitor.visitLocalVariable("i", "I", null, label19, label16, 9);
            methodVisitor.visitLocalVariable("random", "Ljava/util/Random;", null, label17, label16, 7);
            methodVisitor.visitLocalVariable("index", "I", null, label18, label16, 8);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy;", null, label6, label28, 0);
            methodVisitor.visitLocalVariable("api", "Ljava/lang/String;", null, label6, label28, 1);
            methodVisitor.visitLocalVariable("params", "Ljava/util/Map;", "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;", label6, label28, 2);
            methodVisitor.visitLocalVariable("body", "Ljava/util/Map;", "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;", label6, label28, 3);
            methodVisitor.visitLocalVariable("secondaryServers", "Ljava/util/List;", "Ljava/util/List<Ljava/lang/String;>;", label6, label28, 4);
            methodVisitor.visitLocalVariable("method", "Ljava/lang/String;", null, label6, label28, 5);
            methodVisitor.visitLocalVariable("exception", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label7, label28, 6);
            methodVisitor.visitMaxs(6, 12);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PRIVATE, "queryListReqApiProxy", "(Ljava/lang/String;Ljava/util/Map;Ljava/util/Map;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", "(Ljava/lang/String;Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;)Ljava/lang/String;", new String[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitCode();
            Label label0 = new Label();
            Label label1 = new Label();
            Label label2 = new Label();
            methodVisitor.visitTryCatchBlock(label0, label1, label2, "com/alibaba/nacos/api/exception/NacosException");
            Label label3 = new Label();
            Label label4 = new Label();
            Label label5 = new Label();
            methodVisitor.visitTryCatchBlock(label3, label4, label5, "com/alibaba/nacos/api/exception/NacosException");
            Label label6 = new Label();
            Label label7 = new Label();
            Label label8 = new Label();
            methodVisitor.visitTryCatchBlock(label6, label7, label8, "java/lang/Exception");
            Label label9 = new Label();
            methodVisitor.visitLabel(label9);
            methodVisitor.visitLineNumber(121, label9);
            methodVisitor.visitLdcInsn("");
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label10 = new Label();
            methodVisitor.visitLabel(label10);
            methodVisitor.visitLineNumber(122, label10);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 7);
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(124, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "com/alibaba/nacos/client/naming/net/NamingProxy", "reqApi", "(Ljava/lang/String;Ljava/util/Map;Ljava/util/Map;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitVarInsn(ASTORE, 6);
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLineNumber(128, label1);
            Label label11 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label11);
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(125, label2);
            methodVisitor.visitFrame(Opcodes.F_FULL, 8, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/util/Map", "java/util/List", "java/lang/String", "java/lang/String", "com/alibaba/nacos/api/exception/NacosException"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 8);
            Label label12 = new Label();
            methodVisitor.visitLabel(label12);
            methodVisitor.visitLineNumber(126, label12);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitVarInsn(ASTORE, 7);
            Label label13 = new Label();
            methodVisitor.visitLabel(label13);
            methodVisitor.visitLineNumber(127, label13);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingProxy queryListReqApiProxy {} failed.");
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", true);
            methodVisitor.visitLabel(label11);
            methodVisitor.visitLineNumber(129, label11);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitLdcInsn("");
            methodVisitor.visitVarInsn(ASTORE, 8);
            Label label14 = new Label();
            methodVisitor.visitLabel(label14);
            methodVisitor.visitLineNumber(130, label14);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 9);
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(132, label3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryServers", "Ljava/util/List;");
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryReqApi", "(Ljava/lang/String;Ljava/util/Map;Ljava/util/Map;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitVarInsn(ASTORE, 8);
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLineNumber(136, label4);
            Label label15 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label15);
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLineNumber(133, label5);
            methodVisitor.visitFrame(Opcodes.F_FULL, 10, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/util/Map", "java/util/List", "java/lang/String", "java/lang/String", "com/alibaba/nacos/api/exception/NacosException", "java/lang/String", "com/alibaba/nacos/api/exception/NacosException"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 10);
            Label label16 = new Label();
            methodVisitor.visitLabel(label16);
            methodVisitor.visitLineNumber(134, label16);
            methodVisitor.visitVarInsn(ALOAD, 10);
            methodVisitor.visitVarInsn(ASTORE, 9);
            Label label17 = new Label();
            methodVisitor.visitLabel(label17);
            methodVisitor.visitLineNumber(135, label17);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingProxy secondaryServer queryListReqApiProxy  {} failed.");
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryServers", "Ljava/util/List;");
            methodVisitor.visitVarInsn(ALOAD, 10);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", true);
            methodVisitor.visitLabel(label15);
            methodVisitor.visitLineNumber(138, label15);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitJumpInsn(IFNULL, label6);
            methodVisitor.visitVarInsn(ALOAD, 9);
            methodVisitor.visitJumpInsn(IFNULL, label6);
            Label label18 = new Label();
            methodVisitor.visitLabel(label18);
            methodVisitor.visitLineNumber(139, label18);
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitInsn(ATHROW);
            methodVisitor.visitLabel(label6);
            methodVisitor.visitLineNumber(143, label6);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "assist", "Lcn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist;");
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "cn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist", "mergeResult", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitLabel(label7);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label8);
            methodVisitor.visitLineNumber(144, label8);
            methodVisitor.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[]{"java/lang/Exception"});
            methodVisitor.visitVarInsn(ASTORE, 10);
            Label label19 = new Label();
            methodVisitor.visitLabel(label19);
            methodVisitor.visitLineNumber(145, label19);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingProxy mergeResult failed: ");
            methodVisitor.visitVarInsn(ALOAD, 10);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            Label label20 = new Label();
            methodVisitor.visitLabel(label20);
            methodVisitor.visitLineNumber(147, label20);
            methodVisitor.visitVarInsn(ALOAD, 7);
            Label label21 = new Label();
            methodVisitor.visitJumpInsn(IFNONNULL, label21);
            Label label22 = new Label();
            methodVisitor.visitLabel(label22);
            methodVisitor.visitLineNumber(148, label22);
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label21);
            methodVisitor.visitLineNumber(150, label21);
            methodVisitor.visitFrame(Opcodes.F_APPEND, 1, new Object[]{"java/lang/Exception"}, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitInsn(ARETURN);
            Label label23 = new Label();
            methodVisitor.visitLabel(label23);
            methodVisitor.visitLocalVariable("e", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label12, label11, 8);
            methodVisitor.visitLocalVariable("e", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label16, label15, 10);
            methodVisitor.visitLocalVariable("e", "Ljava/lang/Exception;", null, label19, label23, 10);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy;", null, label9, label23, 0);
            methodVisitor.visitLocalVariable("api", "Ljava/lang/String;", null, label9, label23, 1);
            methodVisitor.visitLocalVariable("params", "Ljava/util/Map;", "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;", label9, label23, 2);
            methodVisitor.visitLocalVariable("body", "Ljava/util/Map;", "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;", label9, label23, 3);
            methodVisitor.visitLocalVariable("servers", "Ljava/util/List;", "Ljava/util/List<Ljava/lang/String;>;", label9, label23, 4);
            methodVisitor.visitLocalVariable("method", "Ljava/lang/String;", null, label9, label23, 5);
            methodVisitor.visitLocalVariable("primaryList", "Ljava/lang/String;", null, label10, label23, 6);
            methodVisitor.visitLocalVariable("primaryEx", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label0, label23, 7);
            methodVisitor.visitLocalVariable("secondaryList", "Ljava/lang/String;", null, label14, label23, 8);
            methodVisitor.visitLocalVariable("secondaryEx", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label3, label23, 9);
            methodVisitor.visitMaxs(6, 11);
            methodVisitor.visitEnd();
        }
        classWriter.visitEnd();

        return classWriter.toByteArray();
    }

    public byte[] generateBefore130() {

        ClassWriter classWriter = new ClassWriter(0);
        FieldVisitor fieldVisitor;
        RecordComponentVisitor recordComponentVisitor;
        MethodVisitor methodVisitor;
        AnnotationVisitor annotationVisitor0;

        classWriter.visit(V1_8, ACC_PUBLIC | ACC_SUPER, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", null, "com/alibaba/nacos/client/naming/net/NamingProxy", null);

        classWriter.visitSource("DynamicNamingProxy.java", null);

        {
            fieldVisitor = classWriter.visitField(ACC_PRIVATE, "secondaryServers", "Ljava/util/List;", "Ljava/util/List<Ljava/lang/String;>;", null);
            fieldVisitor.visitEnd();
        }
        {
            fieldVisitor = classWriter.visitField(ACC_PRIVATE, "assist", "Lcn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist;", null, null);
            fieldVisitor.visitEnd();
        }
        {
            fieldVisitor = classWriter.visitField(ACC_PRIVATE | ACC_FINAL, "logger", "Lorg/slf4j/Logger;", null, null);
            fieldVisitor.visitEnd();
        }
        {
            fieldVisitor = classWriter.visitField(ACC_PRIVATE, "maxRetry", "I", null, null);
            fieldVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "<init>", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Properties;)V", null, null);
            methodVisitor.visitCode();
            Label label0 = new Label();
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(26, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "com/alibaba/nacos/client/naming/net/NamingProxy", "<init>", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Properties;)V", false);
            Label label1 = new Label();
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLineNumber(21, label1);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitLdcInsn("com.alibaba.nacos.client.naming");
            methodVisitor.visitMethodInsn(INVOKESTATIC, "org/slf4j/LoggerFactory", "getLogger", "(Ljava/lang/String;)Lorg/slf4j/Logger;", false);
            methodVisitor.visitFieldInsn(PUTFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            Label label2 = new Label();
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(27, label2);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitLdcInsn("namingRequestDomainMaxRetryCount");
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/util/Properties", "getProperty", "(Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitInsn(ICONST_3);
            methodVisitor.visitMethodInsn(INVOKESTATIC, "cn/polarismesh/agent/plugin/nacos/utils/ConvertUtils", "toInt", "(Ljava/lang/String;I)I", false);
            methodVisitor.visitFieldInsn(PUTFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "maxRetry", "I");
            Label label3 = new Label();
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(28, label3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "init", "()V", false);
            Label label4 = new Label();
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLineNumber(29, label4);
            methodVisitor.visitInsn(RETURN);
            Label label5 = new Label();
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy;", null, label0, label5, 0);
            methodVisitor.visitLocalVariable("namespaceId", "Ljava/lang/String;", null, label0, label5, 1);
            methodVisitor.visitLocalVariable("endpoint", "Ljava/lang/String;", null, label0, label5, 2);
            methodVisitor.visitLocalVariable("serverList", "Ljava/lang/String;", null, label0, label5, 3);
            methodVisitor.visitLocalVariable("properties", "Ljava/util/Properties;", null, label0, label5, 4);
            methodVisitor.visitMaxs(5, 5);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PRIVATE, "init", "()V", null, null);
            methodVisitor.visitCode();
            Label label0 = new Label();
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(33, label0);
            methodVisitor.visitLdcInsn("other.nacos.server.addr");
            methodVisitor.visitMethodInsn(INVOKESTATIC, "java/lang/System", "getProperty", "(Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitVarInsn(ASTORE, 1);
            Label label1 = new Label();
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLineNumber(34, label1);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitLdcInsn(",");
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "split", "(Ljava/lang/String;)[Ljava/lang/String;", false);
            methodVisitor.visitMethodInsn(INVOKESTATIC, "java/util/Arrays", "asList", "([Ljava/lang/Object;)Ljava/util/List;", false);
            methodVisitor.visitFieldInsn(PUTFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryServers", "Ljava/util/List;");
            Label label2 = new Label();
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(35, label2);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitTypeInsn(NEW, "cn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist");
            methodVisitor.visitInsn(DUP);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "cn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist", "<init>", "()V", false);
            methodVisitor.visitFieldInsn(PUTFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "assist", "Lcn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist;");
            Label label3 = new Label();
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(36, label3);
            methodVisitor.visitInsn(RETURN);
            Label label4 = new Label();
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy;", null, label0, label4, 0);
            methodVisitor.visitLocalVariable("secondaryServerAddr", "Ljava/lang/String;", null, label1, label4, 1);
            methodVisitor.visitMaxs(3, 2);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PUBLIC, "reqAPI", "(Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", "(Ljava/lang/String;Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;Ljava/lang/String;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;)Ljava/lang/String;", new String[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitCode();
            Label label0 = new Label();
            Label label1 = new Label();
            Label label2 = new Label();
            methodVisitor.visitTryCatchBlock(label0, label1, label2, "java/lang/Exception");
            Label label3 = new Label();
            Label label4 = new Label();
            Label label5 = new Label();
            methodVisitor.visitTryCatchBlock(label3, label4, label5, "com/alibaba/nacos/api/exception/NacosException");
            Label label6 = new Label();
            Label label7 = new Label();
            Label label8 = new Label();
            methodVisitor.visitTryCatchBlock(label6, label7, label8, "com/alibaba/nacos/api/exception/NacosException");
            Label label9 = new Label();
            methodVisitor.visitLabel(label9);
            methodVisitor.visitLineNumber(41, label9);
            methodVisitor.visitTypeInsn(NEW, "java/lang/StringBuilder");
            methodVisitor.visitInsn(DUP);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "java/lang/StringBuilder", "<init>", "()V", false);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
            methodVisitor.visitLdcInsn("@");
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "append", "(Ljava/lang/String;)Ljava/lang/StringBuilder;", false);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/StringBuilder", "toString", "()Ljava/lang/String;", false);
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label10 = new Label();
            methodVisitor.visitLabel(label10);
            methodVisitor.visitLineNumber(44, label10);
            methodVisitor.visitFieldInsn(GETSTATIC, "cn/polarismesh/agent/plugin/nacos/constants/NacosConstants", "REGISTER_SERVICE", "Ljava/lang/String;");
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false);
            Label label11 = new Label();
            methodVisitor.visitJumpInsn(IFEQ, label11);
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(46, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "assist", "Lcn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist;");
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "cn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist", "fillMetadata", "(Ljava/util/Map;)V", false);
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLineNumber(49, label1);
            methodVisitor.visitJumpInsn(GOTO, label11);
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(47, label2);
            methodVisitor.visitFrame(Opcodes.F_FULL, 7, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/lang/String", "java/util/List", "java/lang/String", "java/lang/String"}, 1, new Object[]{"java/lang/Exception"});
            methodVisitor.visitVarInsn(ASTORE, 7);
            Label label12 = new Label();
            methodVisitor.visitLabel(label12);
            methodVisitor.visitLineNumber(48, label12);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingProxy register service fillMetadata failed: ");
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            methodVisitor.visitLabel(label11);
            methodVisitor.visitLineNumber(53, label11);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitFieldInsn(GETSTATIC, "cn/polarismesh/agent/plugin/nacos/constants/NacosConstants", "QUERY_LIST", "Ljava/lang/String;");
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "equals", "(Ljava/lang/Object;)Z", false);
            Label label13 = new Label();
            methodVisitor.visitJumpInsn(IFEQ, label13);
            Label label14 = new Label();
            methodVisitor.visitLabel(label14);
            methodVisitor.visitLineNumber(54, label14);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "queryListReqApiProxy", "(Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label13);
            methodVisitor.visitLineNumber(57, label13);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 7);
            Label label15 = new Label();
            methodVisitor.visitLabel(label15);
            methodVisitor.visitLineNumber(58, label15);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 8);
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(60, label3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "com/alibaba/nacos/client/naming/net/NamingProxy", "reqAPI", "(Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitVarInsn(ASTORE, 7);
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLineNumber(64, label4);
            Label label16 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label16);
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLineNumber(61, label5);
            methodVisitor.visitFrame(Opcodes.F_FULL, 9, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/lang/String", "java/util/List", "java/lang/String", "java/lang/String", "java/lang/String", "com/alibaba/nacos/api/exception/NacosException"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 9);
            Label label17 = new Label();
            methodVisitor.visitLabel(label17);
            methodVisitor.visitLineNumber(62, label17);
            methodVisitor.visitVarInsn(ALOAD, 9);
            methodVisitor.visitVarInsn(ASTORE, 8);
            Label label18 = new Label();
            methodVisitor.visitLabel(label18);
            methodVisitor.visitLineNumber(63, label18);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("primaryServer reqApi failed: {} ");
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitVarInsn(ALOAD, 9);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", true);
            methodVisitor.visitLabel(label16);
            methodVisitor.visitLineNumber(66, label16);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 9);
            Label label19 = new Label();
            methodVisitor.visitLabel(label19);
            methodVisitor.visitLineNumber(67, label19);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 10);
            methodVisitor.visitLabel(label6);
            methodVisitor.visitLineNumber(69, label6);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryServers", "Ljava/util/List;");
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryReqApi", "(Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitVarInsn(ASTORE, 9);
            methodVisitor.visitLabel(label7);
            methodVisitor.visitLineNumber(73, label7);
            Label label20 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label20);
            methodVisitor.visitLabel(label8);
            methodVisitor.visitLineNumber(70, label8);
            methodVisitor.visitFrame(Opcodes.F_FULL, 11, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/lang/String", "java/util/List", "java/lang/String", "java/lang/String", "java/lang/String", "com/alibaba/nacos/api/exception/NacosException", "java/lang/String", "com/alibaba/nacos/api/exception/NacosException"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 11);
            Label label21 = new Label();
            methodVisitor.visitLabel(label21);
            methodVisitor.visitLineNumber(71, label21);
            methodVisitor.visitVarInsn(ALOAD, 11);
            methodVisitor.visitVarInsn(ASTORE, 10);
            Label label22 = new Label();
            methodVisitor.visitLabel(label22);
            methodVisitor.visitLineNumber(72, label22);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("secondaryServer reqApi failed: {} ");
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryServers", "Ljava/util/List;");
            methodVisitor.visitVarInsn(ALOAD, 11);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", true);
            methodVisitor.visitLabel(label20);
            methodVisitor.visitLineNumber(76, label20);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 8);
            Label label23 = new Label();
            methodVisitor.visitJumpInsn(IFNULL, label23);
            methodVisitor.visitVarInsn(ALOAD, 10);
            methodVisitor.visitJumpInsn(IFNULL, label23);
            Label label24 = new Label();
            methodVisitor.visitLabel(label24);
            methodVisitor.visitLineNumber(77, label24);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitInsn(ATHROW);
            methodVisitor.visitLabel(label23);
            methodVisitor.visitLineNumber(81, label23);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 8);
            Label label25 = new Label();
            methodVisitor.visitJumpInsn(IFNONNULL, label25);
            Label label26 = new Label();
            methodVisitor.visitLabel(label26);
            methodVisitor.visitLineNumber(82, label26);
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label25);
            methodVisitor.visitLineNumber(84, label25);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 9);
            methodVisitor.visitInsn(ARETURN);
            Label label27 = new Label();
            methodVisitor.visitLabel(label27);
            methodVisitor.visitLocalVariable("e", "Ljava/lang/Exception;", null, label12, label11, 7);
            methodVisitor.visitLocalVariable("e", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label17, label16, 9);
            methodVisitor.visitLocalVariable("e", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label21, label20, 11);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy;", null, label9, label27, 0);
            methodVisitor.visitLocalVariable("api", "Ljava/lang/String;", null, label9, label27, 1);
            methodVisitor.visitLocalVariable("params", "Ljava/util/Map;", "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;", label9, label27, 2);
            methodVisitor.visitLocalVariable("body", "Ljava/lang/String;", null, label9, label27, 3);
            methodVisitor.visitLocalVariable("servers", "Ljava/util/List;", "Ljava/util/List<Ljava/lang/String;>;", label9, label27, 4);
            methodVisitor.visitLocalVariable("method", "Ljava/lang/String;", null, label9, label27, 5);
            methodVisitor.visitLocalVariable("fullApi", "Ljava/lang/String;", null, label10, label27, 6);
            methodVisitor.visitLocalVariable("primaryRet", "Ljava/lang/String;", null, label15, label27, 7);
            methodVisitor.visitLocalVariable("primaryEx", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label3, label27, 8);
            methodVisitor.visitLocalVariable("secondaryRet", "Ljava/lang/String;", null, label19, label27, 9);
            methodVisitor.visitLocalVariable("secondaryEx", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label6, label27, 10);
            methodVisitor.visitMaxs(6, 12);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PRIVATE, "secondaryReqApi", "(Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", "(Ljava/lang/String;Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;Ljava/lang/String;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;)Ljava/lang/String;", new String[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitCode();
            Label label0 = new Label();
            Label label1 = new Label();
            Label label2 = new Label();
            methodVisitor.visitTryCatchBlock(label0, label1, label2, "com/alibaba/nacos/api/exception/NacosException");
            Label label3 = new Label();
            Label label4 = new Label();
            Label label5 = new Label();
            methodVisitor.visitTryCatchBlock(label3, label4, label5, "com/alibaba/nacos/api/exception/NacosException");
            Label label6 = new Label();
            methodVisitor.visitLabel(label6);
            methodVisitor.visitLineNumber(89, label6);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label7 = new Label();
            methodVisitor.visitLabel(label7);
            methodVisitor.visitLineNumber(90, label7);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "size", "()I", true);
            methodVisitor.visitInsn(ICONST_1);
            Label label8 = new Label();
            methodVisitor.visitJumpInsn(IF_ICMPNE, label8);
            Label label9 = new Label();
            methodVisitor.visitLabel(label9);
            methodVisitor.visitLineNumber(91, label9);
            methodVisitor.visitInsn(ICONST_0);
            methodVisitor.visitVarInsn(ISTORE, 7);
            Label label10 = new Label();
            methodVisitor.visitLabel(label10);
            methodVisitor.visitFrame(Opcodes.F_APPEND, 2, new Object[]{"com/alibaba/nacos/api/exception/NacosException", Opcodes.INTEGER}, 0, null);
            methodVisitor.visitVarInsn(ILOAD, 7);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "maxRetry", "I");
            Label label11 = new Label();
            methodVisitor.visitJumpInsn(IF_ICMPGE, label11);
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(93, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitInsn(ICONST_0);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "get", "(I)Ljava/lang/Object;", true);
            methodVisitor.visitTypeInsn(CHECKCAST, "java/lang/String");
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "callServer", "(Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitLabel(label1);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(94, label2);
            methodVisitor.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 8);
            Label label12 = new Label();
            methodVisitor.visitLabel(label12);
            methodVisitor.visitLineNumber(95, label12);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label13 = new Label();
            methodVisitor.visitLabel(label13);
            methodVisitor.visitLineNumber(96, label13);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "isDebugEnabled", "()Z", true);
            Label label14 = new Label();
            methodVisitor.visitJumpInsn(IFEQ, label14);
            Label label15 = new Label();
            methodVisitor.visitLabel(label15);
            methodVisitor.visitLineNumber(97, label15);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingProxy request {} failed.");
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitInsn(ICONST_0);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "get", "(I)Ljava/lang/Object;", true);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "debug", "(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", true);
            methodVisitor.visitLabel(label14);
            methodVisitor.visitLineNumber(91, label14);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitIincInsn(7, 1);
            methodVisitor.visitJumpInsn(GOTO, label10);
            methodVisitor.visitLabel(label11);
            methodVisitor.visitFrame(Opcodes.F_CHOP, 1, null, 0, null);
            Label label16 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label16);
            methodVisitor.visitLabel(label8);
            methodVisitor.visitLineNumber(102, label8);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitTypeInsn(NEW, "java/util/Random");
            methodVisitor.visitInsn(DUP);
            methodVisitor.visitMethodInsn(INVOKESTATIC, "java/lang/System", "currentTimeMillis", "()J", false);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "java/util/Random", "<init>", "(J)V", false);
            methodVisitor.visitVarInsn(ASTORE, 7);
            Label label17 = new Label();
            methodVisitor.visitLabel(label17);
            methodVisitor.visitLineNumber(103, label17);
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "size", "()I", true);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "java/util/Random", "nextInt", "(I)I", false);
            methodVisitor.visitVarInsn(ISTORE, 8);
            Label label18 = new Label();
            methodVisitor.visitLabel(label18);
            methodVisitor.visitLineNumber(104, label18);
            methodVisitor.visitInsn(ICONST_0);
            methodVisitor.visitVarInsn(ISTORE, 9);
            Label label19 = new Label();
            methodVisitor.visitLabel(label19);
            methodVisitor.visitFrame(Opcodes.F_APPEND, 3, new Object[]{"java/util/Random", Opcodes.INTEGER, Opcodes.INTEGER}, 0, null);
            methodVisitor.visitVarInsn(ILOAD, 9);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "size", "()I", true);
            methodVisitor.visitJumpInsn(IF_ICMPGE, label16);
            Label label20 = new Label();
            methodVisitor.visitLabel(label20);
            methodVisitor.visitLineNumber(105, label20);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitVarInsn(ILOAD, 8);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "get", "(I)Ljava/lang/Object;", true);
            methodVisitor.visitTypeInsn(CHECKCAST, "java/lang/String");
            methodVisitor.visitVarInsn(ASTORE, 10);
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(107, label3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 10);
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "callServer", "(Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitLabel(label4);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLineNumber(108, label5);
            methodVisitor.visitFrame(Opcodes.F_FULL, 11, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/lang/String", "java/util/List", "java/lang/String", "com/alibaba/nacos/api/exception/NacosException", "java/util/Random", Opcodes.INTEGER, Opcodes.INTEGER, "java/lang/String"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 11);
            Label label21 = new Label();
            methodVisitor.visitLabel(label21);
            methodVisitor.visitLineNumber(109, label21);
            methodVisitor.visitVarInsn(ALOAD, 11);
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label22 = new Label();
            methodVisitor.visitLabel(label22);
            methodVisitor.visitLineNumber(110, label22);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "isDebugEnabled", "()Z", true);
            Label label23 = new Label();
            methodVisitor.visitJumpInsn(IFEQ, label23);
            Label label24 = new Label();
            methodVisitor.visitLabel(label24);
            methodVisitor.visitLineNumber(111, label24);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingProxy request {} failed.");
            methodVisitor.visitVarInsn(ALOAD, 10);
            methodVisitor.visitVarInsn(ALOAD, 11);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "debug", "(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", true);
            methodVisitor.visitLabel(label23);
            methodVisitor.visitLineNumber(114, label23);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ILOAD, 8);
            methodVisitor.visitInsn(ICONST_1);
            methodVisitor.visitInsn(IADD);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "java/util/List", "size", "()I", true);
            methodVisitor.visitInsn(IREM);
            methodVisitor.visitVarInsn(ISTORE, 8);
            Label label25 = new Label();
            methodVisitor.visitLabel(label25);
            methodVisitor.visitLineNumber(104, label25);
            methodVisitor.visitIincInsn(9, 1);
            methodVisitor.visitJumpInsn(GOTO, label19);
            methodVisitor.visitLabel(label16);
            methodVisitor.visitLineNumber(117, label16);
            methodVisitor.visitFrame(Opcodes.F_FULL, 7, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/lang/String", "java/util/List", "java/lang/String", "com/alibaba/nacos/api/exception/NacosException"}, 0, new Object[]{});
            methodVisitor.visitVarInsn(ALOAD, 6);
            Label label26 = new Label();
            methodVisitor.visitJumpInsn(IFNONNULL, label26);
            methodVisitor.visitTypeInsn(NEW, "com/alibaba/nacos/api/exception/NacosException");
            methodVisitor.visitInsn(DUP);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "com/alibaba/nacos/api/exception/NacosException", "<init>", "()V", false);
            Label label27 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label27);
            methodVisitor.visitLabel(label26);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitLabel(label27);
            methodVisitor.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitInsn(ATHROW);
            Label label28 = new Label();
            methodVisitor.visitLabel(label28);
            methodVisitor.visitLocalVariable("e", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label12, label14, 8);
            methodVisitor.visitLocalVariable("i", "I", null, label10, label11, 7);
            methodVisitor.visitLocalVariable("e", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label21, label23, 11);
            methodVisitor.visitLocalVariable("server", "Ljava/lang/String;", null, label3, label25, 10);
            methodVisitor.visitLocalVariable("i", "I", null, label19, label16, 9);
            methodVisitor.visitLocalVariable("random", "Ljava/util/Random;", null, label17, label16, 7);
            methodVisitor.visitLocalVariable("index", "I", null, label18, label16, 8);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy;", null, label6, label28, 0);
            methodVisitor.visitLocalVariable("api", "Ljava/lang/String;", null, label6, label28, 1);
            methodVisitor.visitLocalVariable("params", "Ljava/util/Map;", "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;", label6, label28, 2);
            methodVisitor.visitLocalVariable("body", "Ljava/lang/String;", null, label6, label28, 3);
            methodVisitor.visitLocalVariable("secondaryServers", "Ljava/util/List;", "Ljava/util/List<Ljava/lang/String;>;", label6, label28, 4);
            methodVisitor.visitLocalVariable("method", "Ljava/lang/String;", null, label6, label28, 5);
            methodVisitor.visitLocalVariable("exception", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label7, label28, 6);
            methodVisitor.visitMaxs(6, 12);
            methodVisitor.visitEnd();
        }
        {
            methodVisitor = classWriter.visitMethod(ACC_PRIVATE, "queryListReqApiProxy", "(Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", "(Ljava/lang/String;Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;Ljava/lang/String;Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;)Ljava/lang/String;", new String[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitCode();
            Label label0 = new Label();
            Label label1 = new Label();
            Label label2 = new Label();
            methodVisitor.visitTryCatchBlock(label0, label1, label2, "com/alibaba/nacos/api/exception/NacosException");
            Label label3 = new Label();
            Label label4 = new Label();
            Label label5 = new Label();
            methodVisitor.visitTryCatchBlock(label3, label4, label5, "com/alibaba/nacos/api/exception/NacosException");
            Label label6 = new Label();
            Label label7 = new Label();
            Label label8 = new Label();
            methodVisitor.visitTryCatchBlock(label6, label7, label8, "java/lang/Exception");
            Label label9 = new Label();
            methodVisitor.visitLabel(label9);
            methodVisitor.visitLineNumber(121, label9);
            methodVisitor.visitLdcInsn("");
            methodVisitor.visitVarInsn(ASTORE, 6);
            Label label10 = new Label();
            methodVisitor.visitLabel(label10);
            methodVisitor.visitLineNumber(122, label10);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 7);
            methodVisitor.visitLabel(label0);
            methodVisitor.visitLineNumber(124, label0);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "com/alibaba/nacos/client/naming/net/NamingProxy", "reqAPI", "(Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitVarInsn(ASTORE, 6);
            methodVisitor.visitLabel(label1);
            methodVisitor.visitLineNumber(128, label1);
            Label label11 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label11);
            methodVisitor.visitLabel(label2);
            methodVisitor.visitLineNumber(125, label2);
            methodVisitor.visitFrame(Opcodes.F_FULL, 8, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/lang/String", "java/util/List", "java/lang/String", "java/lang/String", "com/alibaba/nacos/api/exception/NacosException"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 8);
            Label label12 = new Label();
            methodVisitor.visitLabel(label12);
            methodVisitor.visitLineNumber(126, label12);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitVarInsn(ASTORE, 7);
            Label label13 = new Label();
            methodVisitor.visitLabel(label13);
            methodVisitor.visitLineNumber(127, label13);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingProxy queryListReqApiProxy {} failed.");
            methodVisitor.visitVarInsn(ALOAD, 4);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", true);
            methodVisitor.visitLabel(label11);
            methodVisitor.visitLineNumber(129, label11);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitLdcInsn("");
            methodVisitor.visitVarInsn(ASTORE, 8);
            Label label14 = new Label();
            methodVisitor.visitLabel(label14);
            methodVisitor.visitLineNumber(130, label14);
            methodVisitor.visitInsn(ACONST_NULL);
            methodVisitor.visitVarInsn(ASTORE, 9);
            methodVisitor.visitLabel(label3);
            methodVisitor.visitLineNumber(132, label3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitVarInsn(ALOAD, 1);
            methodVisitor.visitVarInsn(ALOAD, 2);
            methodVisitor.visitVarInsn(ALOAD, 3);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryServers", "Ljava/util/List;");
            methodVisitor.visitVarInsn(ALOAD, 5);
            methodVisitor.visitMethodInsn(INVOKESPECIAL, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryReqApi", "(Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitVarInsn(ASTORE, 8);
            methodVisitor.visitLabel(label4);
            methodVisitor.visitLineNumber(136, label4);
            Label label15 = new Label();
            methodVisitor.visitJumpInsn(GOTO, label15);
            methodVisitor.visitLabel(label5);
            methodVisitor.visitLineNumber(133, label5);
            methodVisitor.visitFrame(Opcodes.F_FULL, 10, new Object[]{"cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "java/lang/String", "java/util/Map", "java/lang/String", "java/util/List", "java/lang/String", "java/lang/String", "com/alibaba/nacos/api/exception/NacosException", "java/lang/String", "com/alibaba/nacos/api/exception/NacosException"}, 1, new Object[]{"com/alibaba/nacos/api/exception/NacosException"});
            methodVisitor.visitVarInsn(ASTORE, 10);
            Label label16 = new Label();
            methodVisitor.visitLabel(label16);
            methodVisitor.visitLineNumber(134, label16);
            methodVisitor.visitVarInsn(ALOAD, 10);
            methodVisitor.visitVarInsn(ASTORE, 9);
            Label label17 = new Label();
            methodVisitor.visitLabel(label17);
            methodVisitor.visitLineNumber(135, label17);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingProxy secondaryServer queryListReqApiProxy  {} failed.");
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "secondaryServers", "Ljava/util/List;");
            methodVisitor.visitVarInsn(ALOAD, 10);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", true);
            methodVisitor.visitLabel(label15);
            methodVisitor.visitLineNumber(138, label15);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitJumpInsn(IFNULL, label6);
            methodVisitor.visitVarInsn(ALOAD, 9);
            methodVisitor.visitJumpInsn(IFNULL, label6);
            Label label18 = new Label();
            methodVisitor.visitLabel(label18);
            methodVisitor.visitLineNumber(139, label18);
            methodVisitor.visitVarInsn(ALOAD, 7);
            methodVisitor.visitInsn(ATHROW);
            methodVisitor.visitLabel(label6);
            methodVisitor.visitLineNumber(143, label6);
            methodVisitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "assist", "Lcn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist;");
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitMethodInsn(INVOKEVIRTUAL, "cn/polarismesh/agent/plugin/nacos/delegate/NamingProxyAssist", "mergeResult", "(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;", false);
            methodVisitor.visitLabel(label7);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label8);
            methodVisitor.visitLineNumber(144, label8);
            methodVisitor.visitFrame(Opcodes.F_SAME1, 0, null, 1, new Object[]{"java/lang/Exception"});
            methodVisitor.visitVarInsn(ASTORE, 10);
            Label label19 = new Label();
            methodVisitor.visitLabel(label19);
            methodVisitor.visitLineNumber(145, label19);
            methodVisitor.visitVarInsn(ALOAD, 0);
            methodVisitor.visitFieldInsn(GETFIELD, "cn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy", "logger", "Lorg/slf4j/Logger;");
            methodVisitor.visitLdcInsn("DynamicNamingProxy mergeResult failed: ");
            methodVisitor.visitVarInsn(ALOAD, 10);
            methodVisitor.visitMethodInsn(INVOKEINTERFACE, "org/slf4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Throwable;)V", true);
            Label label20 = new Label();
            methodVisitor.visitLabel(label20);
            methodVisitor.visitLineNumber(147, label20);
            methodVisitor.visitVarInsn(ALOAD, 7);
            Label label21 = new Label();
            methodVisitor.visitJumpInsn(IFNONNULL, label21);
            Label label22 = new Label();
            methodVisitor.visitLabel(label22);
            methodVisitor.visitLineNumber(148, label22);
            methodVisitor.visitVarInsn(ALOAD, 6);
            methodVisitor.visitInsn(ARETURN);
            methodVisitor.visitLabel(label21);
            methodVisitor.visitLineNumber(150, label21);
            methodVisitor.visitFrame(Opcodes.F_APPEND, 1, new Object[]{"java/lang/Exception"}, 0, null);
            methodVisitor.visitVarInsn(ALOAD, 8);
            methodVisitor.visitInsn(ARETURN);
            Label label23 = new Label();
            methodVisitor.visitLabel(label23);
            methodVisitor.visitLocalVariable("e", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label12, label11, 8);
            methodVisitor.visitLocalVariable("e", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label16, label15, 10);
            methodVisitor.visitLocalVariable("e", "Ljava/lang/Exception;", null, label19, label23, 10);
            methodVisitor.visitLocalVariable("this", "Lcn/polarismesh/agent/plugin/nacos/delegate/DynamicNamingProxy;", null, label9, label23, 0);
            methodVisitor.visitLocalVariable("api", "Ljava/lang/String;", null, label9, label23, 1);
            methodVisitor.visitLocalVariable("params", "Ljava/util/Map;", "Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;", label9, label23, 2);
            methodVisitor.visitLocalVariable("body", "Ljava/lang/String;", null, label9, label23, 3);
            methodVisitor.visitLocalVariable("servers", "Ljava/util/List;", "Ljava/util/List<Ljava/lang/String;>;", label9, label23, 4);
            methodVisitor.visitLocalVariable("method", "Ljava/lang/String;", null, label9, label23, 5);
            methodVisitor.visitLocalVariable("primaryList", "Ljava/lang/String;", null, label10, label23, 6);
            methodVisitor.visitLocalVariable("primaryEx", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label0, label23, 7);
            methodVisitor.visitLocalVariable("secondaryList", "Ljava/lang/String;", null, label14, label23, 8);
            methodVisitor.visitLocalVariable("secondaryEx", "Lcom/alibaba/nacos/api/exception/NacosException;", null, label3, label23, 9);
            methodVisitor.visitMaxs(6, 11);
            methodVisitor.visitEnd();
        }
        classWriter.visitEnd();

        return classWriter.toByteArray();
    }
}
